import request from '@/router/axios';

export const getList = (page, size, params) => {
  return request({
    url: '/base/storeWillCall/list',
    method: 'post',
    params: {
      ...params,
      page,
      size,
    }
  })
}
export const remove = (id) => {
  return request({
    url: '/base/storeWillCall/delete',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      id,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/base/storeWillCall/addItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/base/storeWillCall/editItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}
export const changeStoreWillCallSet = (storeWillCallSwitch) => {
  return request({
    url: '/api/set/setStoreWillCallSetInfo',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {storeWillCallSwitch}
  })
}

export const getStoreWillCallSet = () => {
  return request({
    url: '/api/set/getStoreWillCallSetInfo',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {}
  })
}
